package com.iscale.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.io.Serializable;


/**
 * <p>
 * 字典
 * </p>
 *
 * @author Andychen
 * @since 2017-03-08
 */
@SuppressWarnings("serial")
@JsonIgnoreProperties(ignoreUnknown = true)
@TableName("sys_dictionary")
public class SysDictionary extends Model<SysDictionary> {

    private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.ID_WORKER)//分布式全局唯一 IdType.ID_WORKER
	private Long id;
    /**
     * 名称
     */
	private String name;
    /**
     * 组id
     */
	private Long pid;
    /**
     * key名称
     */
	@TableField("keyName")
	private String keyName;
    /**
     * key值
     */
	@TableField("keyValue")
	private String keyValue;
    /**
     * 描述
     */
	private String description;
    /**
     * 创建时间
     */
	@TableField("createTime")
	private Date createTime;
    /**
     * 更新时间
     */
	@TableField("updateTime")
	private Date updateTime;
    /**
     * 创建人
     */
	@TableField("createUser")
	private Long createUser;
    /**
     * 更热人
     */
	@TableField("updateUser")
	private Long updateUser;
    /**
     * 排序
     */
	private Long rank;
    /**
     * 数据状态, 0-正常,1:无效 
     */
	private Integer status;
    /**
     * 是否可删除
     */
	@TableField("isFinal")
	private Integer isFinal;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getPid() {
		return pid;
	}

	public void setPid(Long pid) {
		this.pid = pid;
	}

	public String getKeyName() {
		return keyName;
	}

	public void setKeyName(String keyName) {
		this.keyName = keyName;
	}

	public String getKeyValue() {
		return keyValue;
	}

	public void setKeyValue(String keyValue) {
		this.keyValue = keyValue;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Long getCreateUser() {
		return createUser;
	}

	public void setCreateUser(Long createUser) {
		this.createUser = createUser;
	}

	public Long getUpdateUser() {
		return updateUser;
	}

	public void setUpdateUser(Long updateUser) {
		this.updateUser = updateUser;
	}

	public Long getRank() {
		return rank;
	}

	public void setRank(Long rank) {
		this.rank = rank;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getIsFinal() {
		return isFinal;
	}

	public void setIsFinal(Integer isFinal) {
		this.isFinal = isFinal;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	public SysDictionary(){}

	public SysDictionary(String name, Long pid, String keyName, String keyValue, String description, Integer isFinal) {
		this.name = name;
		this.pid = pid;
		this.keyName = keyName;
		this.keyValue = keyValue;
		this.description = description;
		this.isFinal = isFinal;
		this.status = 0;
		this.createTime = new Date();
		this.updateTime = new Date();
	}
}
